#pragma once
#include "ODRoadGeom.h"

#define     FourAD_API   //__declspec(dllexport)

extern "C"
{
    FourAD_API  void                    InitializeODRoadSystem(const wchar_t* filename, double UnitScale = 100.0 );
    FourAD_API  void                    TerminateODRoadSystem();

    // road API
    FourAD_API  int32_t                 GetTotalRoadCount();
    FourAD_API  const char*             GetRoadId(int32_t index);
    FourAD_API  void                    CollectRoadTriangles(const char* id, std::vector<glm::dvec3>& vertices, std::vector<glm::dvec3>& normals, std::vector<glm::dvec3>& tangent, std::vector<glm::dvec3>& binormal, std::vector<glm::dvec2>& uvs, std::vector<std::uint32_t>& indices, std::uint32_t& count, std::vector<std::string>& mats);
    FourAD_API  void                    CollectRoadMarkTriangles(const char* id, std::vector<glm::dvec3>& vertices, std::vector<glm::dvec3>& normals, std::vector<glm::dvec3>& tangent, std::vector<glm::dvec3>& binormal, std::vector<glm::dvec2>& uvs, std::vector<std::uint32_t>& indices, std::uint32_t& count, std::vector<std::string>& mats);

    // junction API
    FourAD_API  int32_t                 GetTotalJunctionCount();
    FourAD_API  const char*             GetJunctionId(int32_t index);
    FourAD_API  void                    CollectJunctionTriangles(const char* id, std::vector<glm::dvec3>& vertices, std::vector<glm::dvec3>& normals, std::vector<glm::dvec3>& tangent, std::vector<glm::dvec3>& binormal, std::vector<glm::dvec2>& uvs, std::vector<std::uint32_t>& indices, std::uint32_t& count, std::vector<std::string>& mats);
            
}